package com.xpgk.mvc.baseInfoSet;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;
import com.xpgk.mvc.right.Right;
import com.xpgk.plugin.ParamInitPlugin;
import com.xpgk.tools.ToolCache;
import com.xpgk.tools.ToolSqlXml;

@SuppressWarnings("unused")
@Table(tableName = BaseInfoSet.table_name)
public class BaseInfoSet extends BaseModel<BaseInfoSet>{

	private static final long serialVersionUID = -2581169048954686311L;

	private static final Log log = Log.getLog(BaseInfoSet.class);

	public static final BaseInfoSet dao = new BaseInfoSet().dao();
	
	public static final String rootIds = "3a0276ca549249bfadb90cb60b4e5325";
	
	public static final String checkbox = "checkbox";
	
	/**
	 * 表名称
	 */
	public static final String table_name = "sb_customer_baseinfoset";

	/**
	 * 字段描述：该条数据添加人员is  字段类型：character varying 长度：32
	 */
	public static final String column_createId = "createId";
	/**
	 * 字段描述：该条数据添加时间  字段类型：datetime 长度：0
	 */
	public static final String column_createDate = "createDate";
	/**
	 * 字段描述：该条数据更新人员id  字段类型：character varying 长度：100
	 */
	public static final String column_updateId = "updateId";
	/**
	 * 字段描述：该条数据更新时间  字段类型：datetime 长度：0
	 */
	public static final String column_updateDate = "updateDate";
	
	/**
	 * 字段描述：主键 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	
	/**
	 * 字段描述：名称 字段类型：character varying 长度：25
	 */
	public static final String column_name = "name";
	
	/**
	 * 字段描述：层级int 长度：2
	 */
	public static final String column_level = "level";

	/**
	 * 字段描述: 是否父节点 string 长度：5
	 */
	public static final String column_isparent = "isparent";
	
	/**
	 * 字段描述: 父节点ids string 长度：32
	 */
	public static final String column_parentids = "parentids";

	/**
	 * 字段描述: 序号 string 长度：11
	 */
	public static final String column_orderid = "orderid";

	/**
	 * 字段描述：图标 string 长度：50
	 */
	public static final String column_icon = "icon";
	
	/**
	 * 字段描述：是否默认值长度：1
	 */
	public static final String column_isDefault = "isDefault";
	
	/**
	 * 字段描述：状态 string 长度：1
	 */
	public static final String column_status = "status";
	
	/**
	 * 字段描述：input类型 
	 */
	public static final String column_input_type = "input_type";
	
	/**
	 * 字段描述：input name 
	 */
	public static final String column_input_name = "input_name";
	
	/**
	 * 字段描述：input value 
	 */
	public static final String column_input_value = "input_value";
	
	/**
	 * 字段描述：input 默认值 
	 */
	public static final String column_input_placeholder = "input_placeholder";
	
	/**
	 * 字段描述：input class 
	 */
	public static final String column_input_class = "input_class";
	
	/**
	 * 字段描述：input 前描述 
	 */
	public static final String column_before_span = "before_span";
	
	/**
	 * 字段描述：input 后描述 
	 */
	public static final String column_after_span = "after_span";
	
	
	
	
	
	
	
	
	/**
	 * sqlId : 描述：查询根节点
	 */
	public static final String sqlId_rootNode = "sys.baseInfoSet.rootNode";

	/**
	 * sqlId : 描述：根据上级节点id查询子部门信息
	 */
	public static final String sqlId_childNode = "sys.baseInfoSet.childNode";
	
	/**
	 * sqlId : 描述：根据上级节点id查询有效子节点
	 */
	public static final String sqlId_child = "sys.baseInfoSet.child";
	
	/**
	 * sqlId : 描述：根据上级节点id查询有效子节点
	 */
	public static final String sqlId_childByCustomer = "sys.baseInfoSet.childByCustomer";
	
	/**
	 * sqlId : 描述：根据上级节点id查询子节点数量
	 */
	public static final String sqlId_childCount = "sys.baseInfoSet.childCount";
	
	/**
	 * sqlId : 描述：分页Select
	 */
	public static final String sqlId_splitPageSelect = "sys.baseInfoSet.splitPageSelect";

	/**
	 * sqlId : 描述：分页from
	 */
	public static final String sqlId_splitPageFrom = "sys.baseInfoSet.splitPageFrom";
	
	
	/**
	 * 关联查询获取子节点
	 * @return
	 */
	public List<BaseInfoSet> getChild(){
		String sql = ToolSqlXml.getSqlMy(sqlId_child);
		return BaseInfoSet.dao.find(sql, this.getPKValue());
	}
	
	public List<BaseInfoSet> getChildByCustomer(String customerIds){
		String sql = ToolSqlXml.getSqlMy(sqlId_childByCustomer);
		return BaseInfoSet.dao.find(sql, customerIds);
		
	}
	
	/**
	 * 早餐时间ids
	 */
	public static final String zcsj_ids ="1db92ea8c8bb4b9faa50c6a2ea667440";
	
	public static final String baseinfo_breakfasttime ="baseinfo_breakfasttime";
	/**
	 * 早餐主食ids
	 */
	public static final String zczs_ids ="d2771f1d0e1a4d41a2f6aa0c93e93f55";
	
	public static final String baseinfo_breakfast ="baseinfo_breakfast";
	/**
	 * 早餐食量ids
	 */
	public static final String zcsl_ids ="addb7f7a740143ba8e1a813e9fff1f54";
	
	public static final String baseinfo_breakfastamount ="baseinfo_breakfastamount";
	/**
	 * 早餐速度ids
	 */
	public static final String zcsd_ids ="f7ed6be980684b6b918b506613687322";
	
	public static final String baseinfo_breakfastSpeed ="baseinfo_breakfastSpeed";
	/**
	 * 早餐饮水量ids
	 */
	public static final String zcysl_ids ="7a09f8fd516341ccb5cbe488614456c0";
	
	public static final String baseinfo_breakfastwater ="baseinfo_breakfastwater";
	/**
	 * 午餐时间ids
	 */
	public static final String wcsj_ids ="698bfc55fe92432abd6795ed0bf902a7";
	
	public static final String baseinfo_lunchtime ="baseinfo_lunchtime";
	/**
	 * 午餐内容ids
	 */
	public static final String wczs_ids ="6d218477d6224537af632e088f7c8fa6";
	
	public static final String baseinfo_lunch ="baseinfo_lunch";
	/**
	 * 午餐量ids
	 */
	public static final String wcsl_ids ="d04c1b76a9224702afcddc847812c2c2";
	
	public static final String baseinfo_lunchamount ="baseinfo_lunchamount";
	/**
	 * 午餐速度ids
	 */
	public static final String wcsd_ids ="83969d47efba4de0a52babe488e8144b";
	
	public static final String baseinfo_lunchSpeed ="baseinfo_lunchSpeed";
	/**
	 * 午餐饮水量ids
	 */
	public static final String wcysl_ids ="686fa53928854d95816ea1721c04e532";
	
	public static final String baseinfo_lunchwater ="baseinfo_lunchwater";
	/**
	 * 晚餐时间ids
	 */
	public static final String ywsj_ids ="a2730e204ed844cd921c860478728513";
	
	public static final String baseinfo_dinnertime ="baseinfo_dinnertime";
	/**
	 * 晚餐主食ids
	 */
	public static final String ywzs_ids ="9c5f396293984363a64f251dc66aca70";
	
	public static final String baseinfo_dinner ="baseinfo_dinner";
	/**
	 * 晚餐食量ids
	 */
	public static final String ywsl_ids ="30b75074649c4990bd83ca3dd52b3b25";
	
	public static final String baseinfo_dinneramount ="baseinfo_dinneramount";
	/**
	 * 晚餐速度ids
	 */
	public static final String ywsd_ids ="9270064a9d774ca2aec2419e6273edb8";
	
	public static final String baseinfo_dinnerSpeed ="baseinfo_dinnerSpeed";
	/**
	 * 晚餐饮水量ids
	 */
	public static final String ywysl_ids ="3b7a2d0513004aeb86148f4b3a476bbb";
	
	public static final String baseinfo_dinnerwater ="baseinfo_dinnerwater";
	/**
	 * 早起时间ids
	 */
	public static final String zqsj_ids ="a5f5dc42e4d54145b4dab1d1e55da01b";
	
	public static final String baseinfo_morning ="baseinfo_morning";
	/**
	 * 午休时间ids
	 */
	public static final String wxsj_ids ="2cbc833ca8a74695b9822a3966717e7d";
	
	public static final String baseinfo_noonbreak ="baseinfo_noonbreak";
	/**
	 * 晚休时间ids
	 */
	public static final String ywxsj_ids ="593fedeed99c4898b66bee5189048bbb";
	
	public static final String baseinfo_nighttime ="baseinfo_nighttime";
	
	public static String getBaseinfo(String key) {
		String result = null;
		if(baseinfo_breakfasttime.equals(key)){
			result = zcsj_ids;
		}
		if(baseinfo_breakfast.equals(key)){
			result = zczs_ids;
		}
		if(baseinfo_breakfastamount.equals(key)){
			result = zcsl_ids;
		}
		if(baseinfo_breakfastSpeed.equals(key)){
			result = zcsd_ids;
		}
		if(baseinfo_breakfastwater.equals(key)){
			result = zcysl_ids;
		}
		if(baseinfo_lunchtime.equals(key)){
			result = wcsj_ids;
		}
		if(baseinfo_lunch.equals(key)){
			result = wczs_ids;
		}
		if(baseinfo_lunchamount.equals(key)){
			result = wcsl_ids;
		}
		if(baseinfo_lunchSpeed.equals(key)){
			result = wcsd_ids;
		}
		if(baseinfo_lunchwater.equals(key)){
			result = wcysl_ids;
		}
		if(baseinfo_dinnertime.equals(key)){
			result = ywsj_ids;
		}
		if(baseinfo_dinner.equals(key)){
			result = ywzs_ids;
		}
		if(baseinfo_dinneramount.equals(key)){
			result = ywsl_ids;
		}
		if(baseinfo_dinnerSpeed.equals(key)){
			result = ywsd_ids;
		}
		if(baseinfo_dinnerwater.equals(key)){
			result = ywysl_ids;
		}
		if(baseinfo_morning.equals(key)){
			result = zqsj_ids;
		}
		if(baseinfo_noonbreak.equals(key)){
			result = wxsj_ids;
		}
		if(baseinfo_nighttime.equals(key)){
			result = ywxsj_ids;
		}
		return result;
	}
	
	
	
}
